﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace GBSHouse.UptimeRobot {
	public class UptimeRobotContact {

		/// <summary>
		/// Gets or sets the ID.
		/// </summary>
		/// <value>
		/// The ID.
		/// </value>
		[JsonProperty("id")]
		public int ID { get; set; }

		/// <summary>
		/// Gets or sets the value.
		/// </summary>
		/// <value>
		/// The value.
		/// </value>
		[JsonProperty("value")]
		public string Value { get; set; }

		/// <summary>
		/// Gets or sets the type.
		/// </summary>
		/// <value>
		/// The type.
		/// </value>
		[JsonProperty("type")]
		public int Type { get; set; }

		/// <summary>
		/// Gets or sets the status.
		/// </summary>
		/// <value>
		/// The status.
		/// </value>
		[JsonProperty("status")]
		public int Status { get; set; }

		/// <summary>
		/// Gets or sets the type of the uptime robot contact.
		/// </summary>
		/// <value>
		/// The type of the uptime robot contact.
		/// </value>
		[JsonIgnore]
		public UptimeRobotContactType UptimeRobotContactType {
			get { return (UptimeRobotContactType)this.Type; }
			set { this.Type = (int)value; }
		}
	}

	public enum UptimeRobotContactType : int {
		SMS = 1,
		Email = 2,
		Twitter = 3,
		Boxcar = 4,
		URL = 5
	}
}
